package com.example.myerp.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.myerp.pojo.S_cell_house;
import com.example.myerp.service.S_cell_houseService;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zhuxingyu
 * @since 2021-08-11
 */
@RestController
@RequestMapping("/purchase/s_cell_house")
public class S_cell_houseController {

    @Autowired
    S_cell_houseService service;


    @RequestMapping("/selectHosue")
    public IPage<S_cell_house> selectHosue(Long pageNum, Long pageSize) {
        return service.selectHosue(pageNum, pageSize);
    }

    @RequestMapping("/updateHosue")
    public Integer updateHosue(Long storeId, String storeName) {
        return service.updateHosue(storeId, storeName);
    }

    @RequestMapping("/auto_HouseId")
    public Long auto_HouseId() {
        return service.auto_HouseId();
    }

    @RequestMapping("/addHouse")
    public Integer addS_cellHouse(String storeName) {
        Integer integer = service.addS_cellHouse(storeName);
        return integer;
    }
    @RequestMapping("/selectList")
    public List<S_cell_house> selectList(){
         return  service.selectList();
    }

}
